/****************************************************************************
 * Chariott - Continuous Integration Testing Tool
 * Zaid Mohsin
 * The University of York
 * 2012/2013
 * MSc in Information Technology
 * All rights reserved.
 ****************************************************************************/
package chariott.partition;

import java.util.ArrayList;

import org.apache.commons.collections.MultiMap;

import chariott.testing.RunItem;

/**
 * a class that sorts the run items according to an algorithm to run on each
 * cloud node.
 * 
 * @author Zaid
 * 
 */
public abstract class AlgorithmOrder {
	protected ArrayList<RunItem> itemsToRun;
	protected int numOfNodes;

	public AlgorithmOrder(int numOfNodes, ArrayList<RunItem> itemsToRun) {

		this.numOfNodes = numOfNodes;
		this.itemsToRun = itemsToRun;
	}

	/**
	 * generates a multi map for each run item to run on which node <Integer
	 * nodeNumber, RunItem item>
	 * 
	 * @return MultiMap a map that maps a key to different objects
	 */
	public abstract MultiMap generateRuns();

}
